package com.ruoyi.ctcx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.ctcx.domain.vo.TbInsuranceSettlePayStatics;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ctcx.mapper.TbInsuranceSettleCasePayMapper;
import com.ruoyi.ctcx.domain.TbInsuranceSettleCasePay;
import com.ruoyi.ctcx.service.ITbInsuranceSettleCasePayService;

/**
 * 保险理赔赔案支付信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-21
 */
@Service
public class TbInsuranceSettleCasePayServiceImpl implements ITbInsuranceSettleCasePayService 
{
    @Autowired
    private TbInsuranceSettleCasePayMapper tbInsuranceSettleCasePayMapper;

    /**
     * 查询保险理赔赔案支付信息
     * 
     * @param id 保险理赔赔案支付信息主键
     * @return 保险理赔赔案支付信息
     */
    @Override
    public TbInsuranceSettleCasePay selectTbInsuranceSettleCasePayById(Long id)
    {
        return tbInsuranceSettleCasePayMapper.selectTbInsuranceSettleCasePayById(id);
    }

    /**
     * 查询保险理赔赔案支付信息列表
     * 
     * @param tbInsuranceSettleCasePay 保险理赔赔案支付信息
     * @return 保险理赔赔案支付信息
     */
    @Override
    public List<TbInsuranceSettleCasePay> selectTbInsuranceSettleCasePayList(TbInsuranceSettleCasePay tbInsuranceSettleCasePay)
    {
        return tbInsuranceSettleCasePayMapper.selectTbInsuranceSettleCasePayList(tbInsuranceSettleCasePay);
    }

    /**
     * 新增保险理赔赔案支付信息
     * 
     * @param tbInsuranceSettleCasePay 保险理赔赔案支付信息
     * @return 结果
     */
    @Override
    public int insertTbInsuranceSettleCasePay(TbInsuranceSettleCasePay tbInsuranceSettleCasePay)
    {
        tbInsuranceSettleCasePay.setCreateTime(DateUtils.getNowDate());
        return tbInsuranceSettleCasePayMapper.insertTbInsuranceSettleCasePay(tbInsuranceSettleCasePay);
    }

    /**
     * 修改保险理赔赔案支付信息
     * 
     * @param tbInsuranceSettleCasePay 保险理赔赔案支付信息
     * @return 结果
     */
    @Override
    public int updateTbInsuranceSettleCasePay(TbInsuranceSettleCasePay tbInsuranceSettleCasePay)
    {
        tbInsuranceSettleCasePay.setUpdateTime(DateUtils.getNowDate());
        return tbInsuranceSettleCasePayMapper.updateTbInsuranceSettleCasePay(tbInsuranceSettleCasePay);
    }

    /**
     * 批量删除保险理赔赔案支付信息
     * 
     * @param ids 需要删除的保险理赔赔案支付信息主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceSettleCasePayByIds(Long[] ids)
    {
        return tbInsuranceSettleCasePayMapper.deleteTbInsuranceSettleCasePayByIds(ids);
    }

    /**
     * 删除保险理赔赔案支付信息信息
     * 
     * @param id 保险理赔赔案支付信息主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceSettleCasePayById(Long id)
    {
        return tbInsuranceSettleCasePayMapper.deleteTbInsuranceSettleCasePayById(id);
    }

    @Override
    public TbInsuranceSettlePayStatics selectSettlePayStaticsByCaseId(Long caseId) {
        return tbInsuranceSettleCasePayMapper.selectSettlePayStaticsByCaseId(caseId);
    }

    @Override
    public TbInsuranceSettlePayStatics selectSettlePayStaticsBySettleId(String settleId) {
        return tbInsuranceSettleCasePayMapper.selectSettlePayStaticsBySettleId(settleId);
    }
}
